home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr48
/
vdl020d.zip
/
VSHARE.DOC
< prev
next >
Wrap
Text File
|
1993-04-14
|
4KB
|
143 lines
{
══════════════════════════════════════════════════════════════════════════════
Visionix DOS File-Sharing Functions Unit (VSHARE)
Copyright 1992 Visionix
ALL RIGHTS RESERVED
──────────────────────────────────────────────────────────────────────────────
Revision history in reverse chronological order:
Initials Date Comment
──────── ──────── ──────────────────────────────────────────────────────────
lpg 03/16/93 Added Source Documentation
lpg 12/27/92 Created
══════════════════════════════════════════════════════════════════════════════
File-Sharing Functions Summary
------------------------------
INT 21h
Func | Sub | Name | Use
-----+-----+------------------------------------+--------------------------------------
44h | 0Bh | Set Sharing Retry Count | Set number of times DOS retries a file sharing operation
5Ch | 00h | Lock File | Denies access to specified region in file
5Ch | 01h | Unlock File | Allow access to specified region in file
-----+-----+------------------------------------+--------------------------------------
NOTE: Use Function GetExtendedError to Process and Parse Error Message
}
Unit VShare;
Function SetShareRetryCnt( RetryCnt : WORD;
Pause : WORD ) : BYTE;
Function LockFile( VAR FileHandle;
LockArea : LONGINT;
LockLen : LONGINT ) : BYTE;
Function UnLockFile( VAR FileHandle;
LockArea : LONGINT;
LockLen : LONGINT ) : BYTE;
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function SetShareRetryCnt( RetryCnt : WORD;
Pause : WORD ) : BYTE;
[PARAMETERS]
RetryCnt Number of Times to Retry before Fail
Pause Pause Time between Retries
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Sets number of times DOS retries a file sharing operation.
Default is 1 Loop, 3 Retries. Pause depends upon computer clock speed.
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function LockFile( VAR FileHandle;
LockArea : LONGINT;
LockLen : LONGINT ) : BYTE;
[PARAMETERS]
FileHandle VAR File Handle (not typed)
LockArea Offset of Region to Lock in File
LockLen Length of Region to Lock in File
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Denies access to specified region in file.
NOTE: File Sharing MUST be loaded before using Lock on a Local Computer
[SEE-ALSO]
[EXAMPLE]
──────────────────────────────────────────────────────────────────────────────
[FUNCTION]
Function UnLockFile( VAR FileHandle;
LockArea : LONGINT;
LockLen : LONGINT ) : BYTE;
[PARAMETERS]
FileHandle VAR File Handle (not typed)
LockArea Offset of Locked Region in File
LockLen Length of Locked Region in File
[RETURNS]
Status Code (0=Success)
[DESCRIPTION]
Allows access to specified region in file.
NOTE: Region Must be same one locked with LockFile Func.
[SEE-ALSO]
[EXAMPLE]